Implantable medical device with pacing capture classification

ABSTRACT

This disclosure is directed to devices and techniques for classifying of pacing captures to evaluate effectiveness of pacing by a pacing device, such as an implantable medical device (IMD). An example system includes stimulation circuitry to generate a pacing stimulus, sensing circuitry to sense an evoked response after the pacing stimulus, and processing circuitry. The processing circuitry determines classification features from the evoked response and applies the classification features to a classification model, the classification model generated by a machine learning algorithm using one or more test sets comprising a plurality of sample evoked responses for each of a plurality of classifications. Based on the output of the model, the processing circuitry classifies the evoke response as one of the plurality of classifications.

RELATED APPLICATION

This application claims the benefit of U.S. Provisional Application No.63/072,685, filed Aug. 31, 2020, the entire contents of which isincorporated herein by reference.

TECHNICAL FIELD

This disclosure generally relates to medical devices, and morespecifically, delivery of cardiac pacing by medical devices.

BACKGROUND

Cardiac pacing is delivered to patients to treat a wide variety ofcardiac dysfunctions. Cardiac pacing is often delivered by animplantable medical device (IMD). An implantablecardioverter-defibrillator (ICD), for example, may provide pacingfunctionality and also provide cardioversion or defibrillation inresponse to detected cardiac tachyarrhythmias, if needed. An IMDtypically delivers such therapy to the heart via electrodes located onone or more leads, which may be intracardiac or extracardiovascularleads, although leadless IMDs for delivering such therapies have alsobeen implemented. Patients with heart failure may be treated withcardiac resynchronization therapy (CRT). CRT is a form of cardiacpacing. The ventricles of some heart failure patients contract in anuncoordinated, or asynchronous, manner, which greatly reduces thepumping efficiency of the ventricles. CRT delivers pacing pulses atparticular times, e.g., atrioventricular (A-V) intervals and/orintra-ventricular (V-V) intervals, and particular locations, e.g., toone or both of the right and left ventricles, to re-coordinate thecontraction of the ventricles. In some examples, CRT involves deliveryof pacing pulses to both ventricles to synchronize their contraction. Inother examples, CRT involves delivery of pacing pulses to one ventricle,such as the left ventricle, to synchronize its contraction with that ofthe right.

SUMMARY

In general, the disclosure is directed to devices and techniques forclassifying of pacing captures to evaluate effectiveness of pacing by apacing device, such as an implantable medical device (IMD). Thetechniques described here use the physiologically meaningful features ofan evoked response to pacing to classify the capture of cardiac tissueby the pacing delivered by the pacing device. These features can bemeasured or derived from the sample evoked response.

Machine learning is used to produce a model that can be run on therelatively limited processing capacity of an IMD. Evoked responses maybe categorized to reflect the effectiveness of pacing. For example,evoked responses may be categorized, in order of effectiveness, as“selective capture,” “non-selective capture,” “right ventricular (RV)capture,” or “no ventricular capture.” Samples of evoked responses arecollected for each classification. In some examples, these sample evokedresponses may include different measurements made by an implantabledevices, such as, far field (FF) measurements, near field measurements(NF), and differential (DIFF) measurements. To prepare for modelgeneration, the physiologically meaningful features are calculatedand/or derived for each sample. These prepared samples are used togenerate one or more training sets and one or more test sets. Thetraining sets used to train a machine learning algorithm to classifypacing captures. Different machine algorithms may be used. For example,a classification algorithm or a regression algorithm may be used. Insome examples, a classification machine learning algorithm may produce adecision tree to classify the pacing based on the features of the evokedresponse. The decision tree may, in some examples, identify key featuresfrom the physiologically meaningful features that are used to classifythe pacing capture.

The model is downloaded to the IMD with the physiologically meaningfulfeatures that are used to classify the pacing. Periodically (e.g.,hourly, daily, weekly, monthly, etc.), the IMD implements a pacing testto evaluate the current pacing settings and, when necessary, adjust thepacing settings. The pacing test provides pacing to the heart and theIMD captures the resulting evoked responses. IMD extracts thephysiologically meaningful features from the evoked responses andimplements the model to classify the pacing. Based on theclassification, the implantable device may adjust, for example, thevoltage level of the stimulation provided by an electrode of the IMD.For example, patient experience and/or device performance may be betterwhen a relatively low voltage is used by the IMD while still providing“selective capture” pacing. In some examples, the voltage provided inthe pacing stimulation may be adjusted during the pacing test todetermine whether a lower voltage will still provide “selective capture”pacing. In this example, when a lower stimulation voltage can be used toprovide effective therapy, the patient receives the therapy while thebattery life of the IMD increases.

An example system includes stimulation circuitry configured to generatea pacing stimulus, sensing circuitry configured to sense an evokedresponse after the pacing stimulus, and processing circuitry. Theprocessing circuitry is configured to determine classification featuresfrom the evoked response and apply the classification features to aclassification model, the classification model generated by a machinelearning algorithm using one or more test sets comprising a plurality ofsample evoked responses for each of a plurality of classifications.Based on the output of the model, the processing circuitry is configuredto classify the evoked response as one of the plurality ofclassifications.

An example method comprises generating a pacing stimulus and sensing anevoked response after the pacing stimulus. The method also includesdetermining classification features from the evoked response. The methodalso includes applying the classification features to a classificationmodel. The classification model is generated by a machine learningalgorithm using one or more test sets comprising a plurality of sampleevoked responses for each of a plurality of classifications.Additionally, the method includes, based on the output of the model,classifying, by the processing circuitry, the evoke response as one ofthe plurality of classifications.

An example computer readable medium comprising instructions, that whenexecuted, cause an implantable medical device (IMD) to generate, bystimulation circuitry, a pacing stimulus, and sense, by sensingcircuitry, an evoked response after the pacing stimulus. Theinstructions also cause the IMD to determine, by processing circuitry,classification features from the evoked response, and apply theclassification features to a classification model. The classificationmodel is generated by a machine learning algorithm using one or moretest sets comprising a plurality of sample evoked responses for each ofa plurality of classifications. Further, the instructions cause the IMDto, based on the output of the model, classify, by the processingcircuitry, the evoked response as one of the plurality ofclassifications.

The summary is intended to provide an overview of the subject matterdescribed in this disclosure. It is not intended to provide an exclusiveor exhaustive explanation of the systems, device, and methods descry bedin detail within the accompanying drawings and description below.Further details of one or more examples of this disclosure are set forthin the accompanying drawings and in the description below. Otherfeatures, objects, and advantages will be apparent from the descriptionand drawings, and from the claims.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a conceptual diagram illustrating an example system forclassifying evoked responses to determine an effectiveness of pacing, inaccordance with the teachings of this disclosure.

FIG. 2 is a conceptual diagram illustrating the IMD and leads of thesystem of FIG. 1 in greater detail.

FIG. 3 is a block diagram illustrating an example configuration of anIMD for classifying evoked responses to determine an effectiveness ofpacing, in accordance with the teachings of this disclosure.

FIG. 4 depicts an example evoked response illustrating physiologicallymeaningful features that may be extracted from the evoked response andused to classify the evoked response, in accordance with the teachingsof this disclosure.

FIGS. 5A, 5B, 5C, and 5D depict example classifications for evokedresponses that were classified in accordance with the teachings of thisdisclosure.

FIG. 6 is a conceptual diagram illustrating an example system togenerate the classification model of FIG. 1 using supervised machinelearning, in accordance with the teachings of this disclosure.

FIG. 7 is a flowchart of an example method to classify evoked responses,in accordance with the teachings of this disclosure.

FIG. 8 is a is a conceptual diagram of a leadless intracardiac pacemakerpositioned within the right atrium for providing ventricular pacing viathe His bundle, in accordance with the teachings of this disclosure.

DETAILED DESCRIPTION

This disclosure is directed to devices and techniques for classifying ofpacing captures to evaluate effectiveness of pacing by a pacing device,such as an implantable medical device (IMD). As used herein, “pacing”refers to the delivery of an electrical impulse and “capture” refers todepolarization of myocardial cells by an electrical impulse. An IMD,such as a pacemaker, is connected to electrodes that are in contact withheart muscle. Pacing by the implantable device at the electrodes causecapture to occur in a wave across the heart muscle. Generally, thisdepolarization wave causes the heart to beat. From time to time, shortlyafter delivering the electrical stimulation (e.g., within 90 to 120milliseconds, etc.), the IMD measures an evoked electrical response ofthe heart muscle. The morphology of the evoked response is indicative ofwhich parts of the heart were affected by the pacing and in whichsequence they were affected. This indicates the effectiveness of thepacing (sometimes referred to as “beat truthing”).

The IMD may classify the response of the heart muscle to the pacingbased on the characteristics of the evoked response to determine theeffectiveness of the pacing. Pacing, as evidenced by the evokedresponse, can be classified into several categories. For example, forHis bundle pacing (HBP), or other conduction system pacing, the pacingmay be classified as “selective capture,” “non-selective capture,”“right ventricular (RV) capture,” or “no ventricular capture.”Generally, selective capture s preferable to non-selective capture(which is preferable to RV capture), while no ventricular capture isundesirable. Selective capture, for example, implies capture of the Hisbundle alone with resulting conduction via the His-Purkinje axis,leading to a QRS duration and morphology identical (or substantiallyidentical) to the patient's native QRS duration. As another example,non-selective capture implies the additional capture of the septalmyocardium, resulting in right ventricular (RV) myocardialpre-excitation and initial slurring and widening of the QRS complex. RVpacing implies excitation primarily of the RV myocardium and a wideningof the QRS complex.

As described below, the IMD uses physiologically meaningful features ofthe evoked response to pacing to classify the pacing. These features canbe measured or derived from the evoked responses. Machine learning isused to produce a model that can be run on the relatively limitedprocessing capacity of an IMD. Additionally or alternatively, the modelmay run off-line or in a cloud. In some examples, the model may beoptimized (e.g., the training set customized) based on a certainpopulation (e.g., a shared location and/or a shared set of demographicand physical data, etc.) and/or individual patient data. Theclassification of the evoked responses may reflect the effectiveness ofpacing. Samples of evoked responses are collected for eachclassification. In some examples, these sample evoked responses mayinclude different measurements made by an implantable device, such as,far field (FF) measurements, near field measurements (NF), anddifferential (DFF) measurements. To prepared for model generation, thephysiologically meaningful features are calculated and/or derived foreach sample. These prepared samples are used to generate one or moretraining sets and one or more test sets. The training sets used to traina machine learning algorithm to classify pacing captures. Differentmachine algorithms may be used, such as a classification algorithm or aregression algorithm, or an ensemble learning method for classificationand regression (e.g., random forests or random decision forests). Insome examples, a classification machine learning algorithm may produce adecision tree model to classify the pacing based on the features of theevoked response. The decision tree may, in some examples, identify keyfeatures from the physiologically meaningful features that are used toclassify the pacing.

The model is downloaded to the IMD with the physiologically meaningfulfeatures that are used to classify the pacing. Periodically (e.g.,daily, weekly, monthly, etc.), the IMD implements a pacing test toevaluate the current pacing settings and, when necessary, adjust thepacing settings. The pacing test provides pacing to the heart and IMDcaptures the resulting evoked responses. IMD extracts thephysiologically meaningful features from the evoked responses andimplements the model to classify the pacing. Based on theclassification, the implantable device may adjust, for example, thevoltage level of the stimulation provided by an electrode of the IMD.For example, patient experience may be better when a relatively lowvoltage is used by the IMD while still providing “selective capture”pacing. In some examples, the voltage provided in the pacing stimulationmay be adjusted during the pacing test to determine whether a lowervoltage will still provide “selective capture” pacing. In this example,when a lower stimulation voltage can be used to provide effectivetherapy, the patient receives the therapy while the battery life of theIMD increases.

FIG. 1 is a conceptual diagram illustrating an example system 10 forclassifying evoked responses to determine an effectiveness of pacing. Asillustrated by example system 10 in FIG. 1, a system for classifyingevoked responses according to the techniques of this disclosure mayinclude an implantable medical device (IMD) 16 with pacing capabilities.IMD 16 is connected to lead 22 and is communicatively coupled toexternal device 24. IMD 16 senses electrical signals attendant to thedepolarization and repolarization of heart 12, e.g., an EGM, viaelectrodes on one or more of lead 22 and/or the housing of IMD 16. IMD16 may also deliver therapy in the form of electrical signals to heart12 via electrodes located on lead 22. The therapy may be pacing,cardioversion and/or defibrillation pulses. IMD 16 may monitor EGMsignals collected by electrodes on lead 22, and based on the EGM signal,classify the pacing to determine its quality.

Lead 22 (sometime referred to as a “His bundle lead”) extends into heart12 of patient 14 to sense electrical activity of heart 12 and/or deliverelectrical stimulation to heart 12. In the example shown in FIG. 1, lead22 extends through one or more veins (not shown), the superior vena cava(not shown), and right atrium 26, and into right ventricle 28. IMD 16may include additional leads, such as a left ventricular (LV) thatextends through one or more veins, the vena cava, right atrium 26, andinto the coronary sinus to a region adjacent to the free wall of leftventricle 32 of heart 12. Lead 22 is positioned to provide pacing to theHis bundle 20 (providing pacing at this location is sometimes referredto as “His bundle pacing” or “HBP”). In the illustrated example, lead 22is positioned to provide pacing to the His bundle 20 between anatrioventricular node (not shown) and branches of Purkinje fibers 30.

Quality and, in some examples, effectiveness of pacing may be determinedby the reaction of heart 12 to pacing. His bundle 20 efficientlytransmits impulses from the atrioventricular node of heart 12 to theventricles (e.g., right ventricle 28 and left ventricle 32) of heart 12via Purkinje fibers 30. The depolarization of myocardial cells caused byHBP may resemble the depolarization of myocardial cells caused bynatural pacing. The capture resulting from pacing that primarily affectsHis bundle 20 is referred to as “selective capture.” In some examples,pacing may cause additional capture of the septal myocardium thatresults in right ventricular (RV) myocardial pre-excitation (e.g.,stimulus affects His bundle 20 and additional septal myocardium, etc.).The resulting capture may be referred to as “non-selective capture.”Capture that is primarily of the septal myocardium of the rightventricle may be referred to as “RV capture.” Pacing that does notaffect the His bundle or the septal myocardium of the right ventriclemay be said to have caused “no ventricular capture.”

In some examples, external device 24 takes the form of a handheldcomputing device, computer workstation or networked computing devicethat includes a user interface for presenting information to andreceiving input from a user. A user, such as a physician, technician,surgeon, electro-physiologist, or other clinician, may interact withexternal device 24 to retrieve physiological or diagnostic informationfrom IMD 16. A user may also interact with external device 24 to programIMD 16, e.g., select values for operational parameters of the IMD.External device 24 may include processing circuitry configured toevaluate EGM signals transmitted from IMD 16 to external device 24.

IMD 16 and external device 24 may communicate via wireless communicationusing any techniques known in the art. Examples of communicationtechniques may include, for example, low frequency or radiofrequency(RF) telemetry, or according to the Bluetooth® or Bluetooth LEspecifications. In some examples, external device 24 may be locatedremotely from IMD 16 and communicate with IMD 16 via a network.

System 10 of FIG. 1 is an example of a system for classifying evokedresponses resulting from pacing to determine an effectiveness and/orquality of pacing. Processing circuitry of IMD 16 includes pacinganalysis circuitry 34 a classification model 35 configured toclassifying evoked responses resulting from pacing. From time to time,shortly after delivering the electrical stimulation (e.g., within 90 to120 milliseconds, etc.), the cardiac signal analysis circuitry measuresan evoked electrical response (sometimes referred to as an “evokedresponse”) characterizing the depolarization wave of the heart muscle ofheart 12. The evoked response is measured via a cardiac electromyogram(EGM) sensed via one or more electrodes of IMD 16. The cardiac signalanalysis circuitry may measure far field (FF) potential (e.g., fromRVtip electrode 25A of lead 22 to the exterior of IMD 16) and near field(NF) potentials (e.g., RVtip electrode 25A to RVring electrode 25B oflead 22). The cardiac signal analysis circuitry may also determinedifferential far field (DFF) potential (e.g., a first order differentialof the FF potential, etc.). For example, a cardiac EGM that includes anevoked response may include P-waves (depolarization of the atria),R-waves (depolarization of the ventricles), and T-waves (repolarizationof the ventricles), among other events. As described below, the cardiacEGM of an evoked response may include physiologically meaningfulfeatures. These physiologically meaningful features are extracted bypacing analysis circuitry 34. Pacing analysis circuitry 34 then usesclassification model 35 to classify the evoked response. In someexamples, IMD 16 may take actions based on the classification of theevoked response, such as adjusting pacing parameters and/or providing analert (e.g., to external device 24).

Although the techniques for classifying evoked responses resulting frompacing to determine an effectiveness and/or quality of pacing accordingto the techniques of this disclosure are described herein primarily withreference to example system 10, the techniques may be performed by othersystems that differ from example system 10. For example, systems foridentifying the one or more parameters according to the techniques ofthis disclosure may include an IMD having different functionality thanIMD 16, and may include more, fewer, or different implantable cardiacleads than lead 22. In some examples, systems for identifying the one ormore parameters include more or fewer leads, do not include anyintracardiac leads, or do not include any leads. Example IMDs that mayimplement the techniques of this disclosure in addition to theillustrated example of IMD 16 include intravascular orextracardiovascular ICDs, and transcatheter pacing systems, such as theMicra™ transcatheter pacing system commercially available from Medtronicplc, of Dublin, Ireland.

FIG. 2 is a conceptual diagram illustrating IMD 16 and lead 22 of system10 in greater detail. In the illustrated example, bipolar electrodes 25Ais located adjacent to a distal end of lead 22. In the illustratedexample, electrode 25A may take the form of extendable helix or tine tipelectrodes. Electrode 25B may take the form of a ring electrodeelectrically insulated from tip electrode 25A. In some examples, each ofelectrodes 25A and 25B is electrically coupled to a respective conductorwithin the lead body of lead 22 and thereby coupled to circuitry withinIMD 16.

In some examples, IMD 16 includes one or more housing electrodes, suchas housing electrode 4 illustrated in FIG. 2, which may be formedintegrally with an outer surface of hermetically sealed housing 8 of IMD16 or otherwise coupled to housing 8. In some examples, housingelectrode 4 is defined by an uninsulated portion of an outward facingportion of housing 8 of IMD 16. Other divisions between insulated anduninsulated portions of housing 8 may be employed to define two or morehousing electrodes. In some examples, a housing electrode includessubstantially all of housing 8.

Housing 8 encloses signal generation circuitry that generatestherapeutic stimulation, such as cardiac pacing, cardioversion, anddefibrillation pulses, as well as sensing circuitry for sensingelectrical signals attendant to the depolarization and repolarization ofheart 12. As described below, housing 8 may also enclose processingcircuitry and memory configured with pacing analysis circuitry 34 andclassification model 35. Housing 8 may also enclose telemetry circuitryfor communication between IMD 16 and external device 24.

IMD 16 senses electrical signals attendant to the depolarization andrepolarization of heart 12 via electrodes 4, 25A, and 25B. Any of theelectrodes 25A and 25B may be used for unipolar sensing in combinationwith housing electrode 4. The illustrated numbers and configurations oflead 22 and electrodes 25A and 25B are merely examples. Otherconfigurations, i.e., number and position of leads and electrodes, arepossible. In some examples, system 10 may include an additional lead orlead segment having one or more electrodes positioned at differentlocations in the cardiovascular system for sensing and/or deliveringtherapy to patient 14. For example, instead of or in addition tointracardiac lead 22, system 10 may include one or moreextracardiovascular (e.g., epicardial, substernal, or subcutaneous)leads not positioned within the heart.

FIG. 3 is a block diagram illustrating an example configuration of IMD16. In the illustrated example, IMD 16 includes processing circuitry 70,memory 72, signal generation circuitry 74, sensing circuitry 76,telemetry circuitry 78, pacing analysis circuitry 34, and activitysensor 82. Memory 72 includes computer-readable instructions that, whenexecuted by processing circuitry 70, cause IMD 16 and processingcircuitry 70 to perform various functions attributed to IMD 16 andprocessing circuitry 70 herein. Memory 72 may include any volatile,non-volatile, magnetic, optical, or electrical media, such as a randomaccess memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM),electrically-erasable programmable ROM (EEPROM), flash memory, or anyother digital or analog media.

Processing circuitry 70 may include any one or more of a microprocessor,a controller, a digital signal processor (DSP), an application specificintegrated circuit (ASIC), a field-programmable gate array (FPGA), orequivalent discrete or analog logic circuitry. In some examples,processing circuitry 70 may include multiple components, such as anycombination of one or more microprocessors, one or more controllers, oneor more DSPs, one or more ASICs, or one or more FPGAs, as well as otherdiscrete or integrated logic circuitry. The functions attributed toprocessing circuitry 70 herein may be embodied as software, firmware,hardware, or any combination thereof.

Signal generation circuitry 74 is configured to generate and deliverpacing stimulation to patient 14. As shown in FIG. 3, signal generationcircuitry 74 is electrically coupled to electrodes 4, 25A, and 25B,e.g., via conductors of lead 22 and, in the case of housing electrode 4,within housing 8. For example, signal generation circuitry 74 maydeliver pacing, defibrillation, or cardioversion pulses to heart 12 viaat least electrode 25A. In some examples, signal generation circuitry 74delivers therapy in the form of signals other than pulses such as sinewaves, square waves, or other substantially continuous time signals.

Electrical sensing circuitry 76 monitors electrical cardiac signals fromany combination of electrodes 4, 25A, and 25B. Sensing circuitry 76 mayalso include switching circuitry which processing circuitry 70 controlsto select which of the available electrodes are used to sense the heartactivity, depending upon which electrode combination is used in thecurrent sensing configuration. In some examples, sensing circuitry 76may include one or more amplifiers, filters, and analog-to-digitalconverters.

Sensing circuitry 76 may include one or more detection channels, each ofwhich may include an amplifier. The detection channels may be used tosense cardiac signals, such as cardiac EGMs indicative of an evokedresponse after signal generation circuitry 74 generates the pacingstimulation. For example, sensing circuitry 76 may sense an EGM of theNF potential and an EGM of the FF potential. Sensing circuitry 76 mayapply a low-pass filter (e.g., 12 Hertz (Hz) at a 256 Hz sampling rate,etc.) and/or a five-point differential (e.g., at a 256 Hz sampling rate,etc.). The detection channels may provide the signals to ananalog-to-digital converter, for conversion into a digital signal forprocessing or analysis by processing circuitry 70 or pacing analysiscircuitry 34.

Periodically (e.g., daily, weekly, monthly, etc.), processing circuitry70 may perform a series of test pacing to evaluate the pacing beingprovided to heart 12. During these series of test pacing, pacinganalysis circuitry 34 causes sensing circuitry 76 to capture cardiacEGMs after signal generation circuitry 74 generates the pacingstimulation for the pacing tests. Pacing analysis circuitry 34 generatesa DFF potential. Pacing analysis circuitry 34 extracts portions of thecardiac EGMs of the FF potential, the DFF potential, and/or the NFpotential from a time period (e.g., 220 millisecond, etc.) after eachpacing test stimulation. The portions extracted from the cardiac EMGs ofthe FF potential, the DFF potential, and/or the NF potential may becollectively referred to as the “evoked response” of that test pacingstimulation. For each evoked response, pacing analysis circuitry 34extracts and/or derives physiologically significant features from theevoked response. Pacing analysis circuitry 34 uses classification model35 to classify each evoked response based on these physiologicallysignificant features. For example, pacing analysis circuitry 34 mayclassify each evoked response as “selective capture,” “non-selectivecapture,” “RV capture,” or “no capture.” In some examples, pacinganalysis circuitry 34 may additionally or alternatively classify evokedresponses to pacing other than the test pacing. For example, pacinganalysis circuitry 34 may randomly or pseudo-randomly sample evokeresponses after pacing for later analysis via, for example, externaldevice 24. In some examples, processing circuitry 70 acts in response tothe classification of the test pacing. For example, processing circuitry70 may adjust stimulation voltage for pacing. In one scenario,processing circuitry 70 may reduce stimulation voltage during eachsubsequent test pacing until the stimulation voltage no longer providesselective capture. Processing circuitry 70 may set the stimulationvoltage to be the last voltage that provided selective capture plus, insome examples, an additional voltage margin.

Classification model 35 is a model that takes, as input, thephysiologically significant features (sometimes referred to as the“classification features”). and outputs the classification.Classification model 35 is generated using supervised machine learning.To train the classification model 35, training sets and validation setsare generated (collectively referred to as “ML sets”). The ML set aregenerated by collecting sample evoked responses (e.g., the NF, FF, andDFF potentials of evoked responses) for each classification. Featuresare extracted or derived from the sample evoked response. These featuresinclude quantifiable values, such as the absolute or relative voltagesof, for example, the Q-wave, the R-wave, and the S-wave, etc. and theassociated timings of these characteristics. Through training,classification model 35 determines the which of the features arephysiologically significant features. That is, the physiologicallysignificant features are the features that, through machine learning,the classification model 35 determines are relevant to theclassification process. For example, there may be fifteen features thatmay be extracted and/or derived from the sample evoked responses, butthrough machine learning, only thirteen of the features may be used toclassify evoked responses (e.g., the physiologically significantfeatures). That is, in some examples, the physiologically significantfeatures include some, but not all, of the features of the evokedresponses (e.g., the physiologically significant features are a subsetof the features of the evoked response, etc.). In such an example, whenimplemented by IMD 16, pacing analysis circuitry 34 may only need toextract and/or derive the thirteen physiologically significant featuresinstead of all of the possible extractable and/or derivable features.Different machine learning algorithms may be used, such as aclassification algorithm (e.g., a decision tree algorithm, a k-nearestneighbor (KNN) algorithm, etc.) or a regression algorithm (e.g., alinear regression algorithm, a polynomial regression algorithm, etc.).In some examples, a classification machine learning algorithm mayproduce a decision tree model to classify the pacing based on thefeatures of the evoked responses.

FIG. 4 depicts an example evoked 400 response illustratingphysiologically meaningful features that may be extracted from evokedresponse 400 that may be used to classify evoked response 400. In theillustrated examples, evoked response 400 includes a far filed (FF)potential 402, a near filed (NF) potential 404, and a differential farfield (DFF) potential 406. FF potential 402 may be measured betweenelectrode 25A of lead 22 (sometime referred to as “RVtip”) and housingelectrode 4 (sometimes referred to as “Can”). In some examples thatinclude other electrodes, such as an ICD that includes defibrillationelectrodes, FF potential 402 may be measured between electrode 25A andsuch other electrodes. NF potential 404 may be measured betweenelectrode 25A of lead 22 and electrode 25B of lead 22 (sometime referredto as “RVring”). DFF potential 406 may be a first order differential ofthe FF potential 402. The physiologically meaningful features may beextracted over window 408 (e.g., 220 milliseconds (ms), etc.) after thepacing is delivered.

FF potential 402, FF potential 404, and DFF potential 406 may havephysiologically meaningful features that may be used to classify evokedresponse 400. The following are a non-exhaustive list of potentialphysiologically meaningful features that may be used by classificationmodel 35. One physiologically meaningful feature may be a time betweenthe pacing and the response of FF potential 402 when the negativedeflection is below a certain threshold (sometimes referred to as “T1”,and the zero line is adjusted based on the EGM value before the start ofventricular pacing). One physiologically meaningful feature may be awidth, as a measure of time, of the FF potential 402 at negativedeflection (e.g., starting and ending when the potential crosses of apre-defined threshold) (sometimes referred to as “T2”). Onephysiologically meaningful feature may be a time between the start ofventricular pacing to the positive peak of DFF potential 406 (sometimesreferred to as “T4”). One physiologically meaningful feature may be atime between the start of ventricular pacing to the positive peak of NFpotential 404 (sometimes referred as “T6”). One physiologicallymeaningful feature may be a time between the start of ventricular pacingto the positive peak of FF potential 402 (sometimes referred to as“T_(MAX)”). One physiologically meaningful feature may be a time betweenthe start of ventricular pacing to the negative peak of FF potential 402*sometimes referred to as “T_(MIN)”). One physiologically meaningfulfeature may be a negative peak amplitude of FF potential 402 from zeroline within window 408 (sometimes referred to as “A1”). Onephysiologically meaningful feature may be an amplitude of FF potential402 from negative peak to positive peak within window 408 (sometimesreferred to as “A2”). One physiologically meaningful feature may be apositive peak amplitude of DFF potential 406 within a window 408(sometimes referred to as “A3”). One physiologically meaningful featuremay be an absolute peak amplitude from zero line of NF potential 404(sometimes referred to as “AMAX”). One physiologically meaningfulfeature may be a negative slope following the maximum positive peak ofFF potential 402 (sometimes referred to as “SP1”). Other physiologicallymeaningful features may be derived, such as a ratio of T4 to A3, etc.

FIGS. 5A, 5B, 5C, and 5D depict example classifications for evokedresponses 500A, 500B, 500C, and 500D that were classified in accordancewith the teachings of this disclosure. Pacing, as evidenced by theevoked responses, may be categorized as ‘selective capture,”“non-selective capture,” “RV capture,” and “no capture” (sometimesreferred to a “no ventricular capture”). In some examples, pacingcategorized as “RV capture” may further be categorized as “fusioncapture” (e.g., multiple electrical impulses act upon the rightventricular chamber) and “right bundle capture” (e.g., capture of justthe bundle of Purkinje fibers 30 of right ventricle 28). FIG. 5Aillustrates an evoked response 502A indicative of selective capture.FIG. 5B illustrated an evoked response 502B indicative of non-selectivecapture. FIG. 5C illustrated an evoked response 502C indicative ofnon-selective capture. FIG. 5D illustrated an evoked response 502Dindicative of RV capture.

FIG. 6 is a conceptual diagram illustrating an example system 600 togenerate the classification model of FIG. 1 using supervised machinelearning, in accordance with the teachings of this disclosure.Supervised machine learning trainer 602 generates a model (e.g., model35) that may operate on IMD 16 to classify evoked responses (e.g.,evoked responses 500A, 500B, 500C, and 500D of FIG. 5). Throughsupervised machine learning, the machine learning trainer 602 identifieswhich of the physiologically meaningful features are to be extractedfrom evoked responses to classify the pacing. Machine learning trainer602 infers relationships between inputs (e.g., the physiologicallymeaningful features) and outputs (e.g., the classifications) from a setof labeled pairs. The labeled pairs each include (a) a set ofphysiologically meaningful features extracted from an evoked responseand (b) the classification of that evoked response. The labeled pairsare split into one or more training sets 604 and one or more validationsets 606. Machine learning trainer 602 infers relationships between thephysiologically meaningful features and classifications based on thelabeled pairs in training set. In some examples, machine learningtrainer 602 uses a classification tree algorithm to produce a candidatemodel. The candidate model is then evaluated by model evaluator 608using validations sets 606. Model evaluator 608 scores the candidatemodel based on, for example, a percentage of classifications that werecorrect (sometimes referred to as “true positives”) and a percentage ofclassifications that were incorrect (sometimes referred to as “falsenegatives”). Each classification may be scored separately. For example,model evaluator 608 may separately score the “Selective Capture”classification, the “Non-Selective Capture” classification, the “RVCapture” classification, and the “No Capture” classification. A modelmay be accepted if all classifications satisfy (e.g., are greater thanor equal to) a true positive percentage and/or all classificationssatisfy (e.g., are less than) a false negative percentage. For example,a candidate model may be accepted if the true positive percentage forall classifications are at least 85 percent and no one classification isfalsely identified as another classification more than 5 percent of thetime. If a candidate model fails, machine learning trainer 602 maygenerate a new candidate model with one or more different sets oftraining data (e.g., labeled pairs may be redistributed randomly betweentraining sets 604 and validation sets 606, etc.) after tuning theparameters of the machine learning algorithm.

FIG. 7 is a flowchart of an example method to classify evoked responses,in accordance with the teachings of this disclosure. From time to time,IMD 16 performs a pacing test. For example, IMD 16 may perform a pacingtest daily or weekly at a time when patient 14 is likely asleep. IMD 16uses the pacing test to, for example, determine whether the currentstimulation level of pacing is providing effective capture and whether adifferent amplitude of stimulation (e.g., an amplitude that uses a lowervoltage, etc.) may still provide effective capture. Initially, IMD 16captures a near field (NF) electrogram and a far field (FF) electrogramfor a period after pacing (e.g., 100 ms, 160 ms, 220 ms, etc.) (702).IMD 16 generates a differential far field (DIFF) electrogram that is afirst order differential of the far field electrogram (704). In someexamples, the pacing test may provide a series of pacing such that IMD16 may extract FF, NF, and DFF potentials for multiple beats. In somesuch examples, one or more of the finals pacing stimulus signals maychange one or more pacing parameters (e.g., amplitude, pulse width,etc.) such that a new pacing parameter may be compared to existingpacing parameters. IMD 16 extracts the beat(s) (706).

IMD 116 selects the first or next beat (708). IMD 16 determines whetheran FF electrogram baseline is greater than a threshold (e.g., 0.8 mV,etc.) before the pacing stimulus (710). When the FF electrogram baselineis not greater than a threshold (“NO” at 710) IMD 16 determines that thecapture “beat” is an artifact and provides no classification (712).Otherwise, when IMD 16 determines whether a FF electrogram baseline isgreater than a threshold (“YES” at 710), IMD 16 extracts features fromthe FF, NF and DFF electrograms and, in some examples, derive parametersbased on features and parameters used by model 35 to classify the beats(e.g., a specific list of features provided when model 35 is downloadedinto IMD 16, etc.) (714). IMD 16 classifies the beat using model 35 andthe features and parameters (716). When there is another beat toclassify (“YES” at 718), IMD 16 selects the next beat (708). When thereis not another beat to classify (“NO” at 718), the method ends. In someexamples IMD 16 may further take actions in response to theclassification, such as adjusting the amplitude and/or pulse width ofthe stimulation. In some examples, IMD 116 may perform pacing tests withreduced stimulus amplitudes until the beats change from a “selectivecapture” classification to a “non-selective capture” classification. Insome such examples, IMD 116 may set the amplitude of the stimulus basedon the lowest amplitude (e.g., with an added safety margin) that wasclassified as “selective capture.”

FIG. 8 is a conceptual diagram of a leadless intracardiac pacemaker 800positioned within the right atrium (RA) of heart 12 for providingventricular pacing via the His bundle. Pacemaker 800 may include adistal tip electrode 802 extending away from a distal end 812 of thepacemaker housing 805. Intracardiac pacemaker 800 is shown implanted inthe RA of the patient's heart 12 to place distal tip electrode 802 fordelivering pacing pulses to the His bundle. For example, the distal tipelectrode 802 may be inserted into the inferior end of the interatrialseptum, beneath the AV node and near the tricuspid valve annulus toposition tip electrode 802 in, along or proximate to the His bundle.Distal tip electrode 102 may be a helical electrode providing fixationto anchor the pacemaker 800 at the implant position. In other examples,pacemaker 800 may include a fixation member that includes one or moretines, hooks, barbs, helices, or other fixation member(s) that anchorthe distal end of the pacemaker 800 at the implant site.

A portion of the distal tip electrode 802 may be electrically insulatedsuch that only the most distal end of tip electrode 802, furthest fromhousing distal end 812, is exposed to provide targeted pacing at atissue site that includes a portion of the His bundle. One or morehousing-based electrodes 804 and 806 may be carried on the surface ofthe housing of pacemaker 100. Electrodes 804 and 806 are shown as ringelectrodes circumscribing the longitudinal sidewall of pacemaker housing805 extending from distal end 812 to proximal end 810. In otherexamples, a return anode electrode used in sensing and pacing may bepositioned on housing proximal end 810. Pacing of the ventricles, e.g.,via the His-Purkinje system, may be achieved using the distal tipelectrode 802 as the cathode electrode and either of the housing-basedelectrodes 804 and 806 as the return anode.

Cardiac electrical signals produced by heart 12 may be sensed bypacemaker 800 using a sensing electrode pair selected from electrodes802, 804 and 806. For example, a ventricular electrical signal forsensing ventricular R-waves may be sensed using distal tip electrode 812and distal housing-based electrode 804. An atrial electrical signal forsensing atrial P-waves may be sensed using electrodes 804 and 806. Theatrial and ventricular electrical signals may be analyzed for sensingatrial and ventricular events. In some examples, pacemaker 800 is a dualchamber pacemaker configured to deliver atrial pacing pulses using ahousing based distal electrode 804 and proximal electrode 806 anddeliver ventricular pacing pulses via tip electrode 802 and proximalelectrode 806. Examples of dual chamber intracardiac pacemakers whichmay incorporate the techniques disclosed herein for controllingventricular sensing parameters are generally disclosed in U.S. PatentApplication Publication No. 2019/0083800 (Yang, et al.), incorporatedherein by reference in its entirety.

Processing circuitry of pacemaker 800 includes pacing analysis circuitry(e.g., pacing analysis circuitry 34, etc.) and a classification model(e.g., classification model 35, etc.) configured to classifying evokedresponses resulting from pacing. From time to time, shortly afterdelivering the electrical stimulation (e.g., within 90 to 120milliseconds, etc.), the pacing signal analysis circuitry measures anevoked response of the heart muscle of heart 12. The evoked response ismeasured via an EGM sensed via one or more electrodes of pacemaker 800.The cardiac signal analysis circuitry may measure the FF potential andthe NF potential. The cardiac signal analysis circuitry may alsodetermine the DFF potential. The cardiac EGM that includes an evokedresponse may include the P-waves, the R-waves, and the T-waves. Asdescribed above, the cardiac EGM of an evoked response may includephysiologically meaningful features. These physiologically meaningfulfeatures are extracted by pacing analysis circuitry. Pacing analysiscircuitry then uses classification model to classify the evokedresponse. In some examples, pacemaker 800 may take actions based on theclassification of the evoked response, such as adjusting pacingparameters and/or providing an alert (e.g., to external device 24).

The following examples are described herein.

Example 1A. A system comprises stimulation circuitry configured togenerate a pacing stimulus, sensing circuitry configured to sense anevoked response after the pacing stimulus, and processing circuitryconfigured to: determine classification features from the evokedresponse, apply the classification features to a classification model,the classification model generated by a machine learning algorithm usingone or more test sets comprising a plurality of sample evoked responsesfor each of a plurality of classifications, and based on the output ofthe model, classify the evoke response as one of the plurality ofclassifications.

Example 1B. The system of Example 1A, wherein the classificationfeatures are a subset of possible features of the evoked response.

Example 1C. The system of 1B, wherein the classification features aredetermined by the machine learning algorithm from the possible featuresof the evoked response.

Example 1D. The system of any of Examples 1A or 1B, wherein the evokedresponse is indicative of capture of heart muscle in response to thepacing stimulus, and wherein the plurality of classifications includesselective capture, non-selective capture, right ventricular capture, andno ventricular capture

Example 1E. The system of any of Examples 1A, 1B, or 1D, wherein theclassification model is a decision tree model.

Example 1F. The system of any of Examples 1A, 1B, 1D, or 1E, wherein theprocessing circuitry is configured to, in response to classifying theevoked response as one of the plurality of classifications, generate analert.

Example 1G. The system of any of Examples 1A, 1B, 1D, 1E, or 1F, whereinthe processing circuitry is configured to, in response to classifyingthe evoked response as one of the plurality of classifications, change avoltage level of pacing stimulus.

Example 1H. The system of any of Examples 1A, 1B, 1D, 1E, 1F, or 1G,including an implantable medical device comprising the stimulationcircuitry, the sensing circuitry, and the processing circuitry.

Example 1J. The system of any of Examples 1A, 1B, 1D, 1E, 1F, 1G, or 1H,wherein the sensing circuitry is configured to sense a near fieldelectrogram (EGM) of the evoked response and a far-field EGM of theevoked response, and wherein the processing circuitry is configured todetermine a differential far field EMG.

Example 1J. The system of Examples 1I, wherein the classificationfeatures comprise two or more of (a) a time (T1) between the pacingstimulus and a response of the FF potential when a negative deflectionis below a predefined threshold, (b) a width (T2) of the FF potential atthe negative deflection, (c) a time (T4) between a start of the pacingstimulus to a positive peak of the DFF potential, (d) a time (T6)between the start of the pacing stimulus to a positive peak of the NFpotential, (e) a time (TMAX) between the start of the pacing stimulus toa positive peak of the FF potential, (f) a time (TMIN) between the startof ventricular pacing to a negative peak of the FF potential, (g) anegative peak amplitude (A1) of the FF potential from a zero line withina predefined window, (h) an amplitude (A2) of the FF potential from thenegative peak to a positive peak within the predefined window 408, (i) apositive peak amplitude (A3) of the DFF potential within the predefinedwindow, (j) an absolute peak amplitude (AMAX) from a zero line of the NFpotential, and (k) a negative slope (SP1) following a maximum positivepeak of the FF potential.

Example 2A. A method comprising generating, by stimulation circuitry, apacing stimulus, sensing, by sensing circuitry, an evoked response afterthe pacing stimulus, determining, by processing circuitry,classification features from the evoked response, applying, by theprocessing circuitry, the classification features to a classificationmodel, the classification model generated by a machine learningalgorithm using one or more test sets comprising a plurality of sampleevoked responses for each of a plurality of classifications, and basedon the output of the model, classifying, by the processing circuitry,the evoke response as one of the plurality of classifications.

Example 2B. The method of Example 2A, wherein the classificationfeatures are a subset of possible features of the evoked response.

Example 2C. The method of Example 2B, wherein the classificationfeatures are determined by the machine learning algorithm from thepossible features of the evoked response.

Example 2D. The method of any of Examples 2A or 2B, wherein the evokedresponse is indicative of capture of heart muscle in response to thepacing stimulus, and wherein the plurality of classifications includesselective capture, non-selective capture, right ventricular capture, andno ventricular capture.

Example 2E. The method of any of Examples 2A, 2B or 2D, wherein theclassification model is a decision tree model.

Example 2F. The method of any of Examples 2A, 2B, 2D, or 2E, comprising,in response to classifying the evoked response as one of the pluralityof classifications, generating an alert.

Example 2G. The method of any of Examples 2A, 2B, 2D, 2E, or 2F,comprising, in response to classifying the evoked response as one of theplurality of classifications, changing a voltage level of pacingstimulus.

Example 2H. The method of any of Examples 2A, 2B, 2D, 2E, 2F, and 2G,wherein the stimulation circuitry, the sensing circuitry, and theprocessing circuitry are within an implantable medical device.

Example 21. The method of any of Examples 2A, 2B, 2D, 2E, 2F, 2G, and2H, wherein the evoked response includes a far field (FF) potential, anear field (NF) potential and a differential far field (DFF) potential,and wherein the classification features comprise two or more of (a) atime (T1) between the pacing stimulus and a response of the FF potentialwhen a negative deflection is below a predefined threshold, (b) a width(T2) of the FF potential at the negative deflection, (c) a time (T4)between a start of the pacing stimulus to a positive peak of the DFFpotential, (d) a time (T6) between the start of the pacing stimulus to apositive peak of the NF potential, (e) a time (TMAX) between the startof the pacing stimulus to a positive peak of the FF potential, (f) atime (TMIN) between the start of ventricular pacing to a negative peakof the FF potential, (g) a negative peak amplitude (A1) of the FFpotential from a zero line within a predefined window, (h) an amplitude(A2) of the FF potential from the negative peak to a positive peakwithin the predefined window 408, (i) a positive peak amplitude (A3) ofthe DFF potential within the predefined window, (j) an absolute peakamplitude (AMAX) from a zero line of the NF potential, and (k) anegative slope (SP1) following a maximum positive peak of the FFpotential.

Example 2J. The method of any of Examples 2A, 2B, 2D, 2E, 2F, 2G, or 2H,wherein sensing the evoke response includes sensing a near fieldelectrogram (EGM) of the evoked response and a far-field EGM of theevoked response, the method comprising determining, by the processingcircuitry, a differential far field EMG based on the far field EMG.

Example 3A. A computer readable medium comprising instructions, thatwhen executed, cause an implantable medical device (IMD) to: generate,by stimulation circuitry of the IMD, a pacing stimulus; sense, bysensing circuitry of the IMD, an evoked response after the pacingstimulus; determine, by processing circuitry of the IMD, classificationfeatures from the evoked response; apply, by the processing circuitry,the classification features to a classification model, theclassification model generated by a machine learning algorithm using oneor more test sets comprising a plurality of sample evoked responses foreach of a plurality of classifications; and based on the output of themodel, classify, by the processing circuitry, the evoke response as oneof the plurality of classifications.

The techniques described in this disclosure may be implemented, at leastin part, in hardware, software, firmware or any combination thereof. Forexample, various aspects of the described techniques may be implementedwithin one or more processors or processing circuitry, including one ormore microprocessors, digital signal processors (DSPs), applicationspecific integrated circuits (ASICs), field programmable gate arrays(FPGAs), or any other equivalent integrated or discrete logic circuitry,as well as any combinations of such components. The term “processor” or“processing circuitry” may generally refer to any of the foregoing logiccircuitry, alone or in combination with other logic circuitry, or anyother equivalent circuitry. A control unit including hardware may alsoperform one or more of the techniques of this disclosure.

Such hardware, software, and firmware may be implemented within the samedevice or within separate devices to support the various operations andfunctions described in this disclosure. In addition, any of thedescribed units, circuits or components may be implemented together orseparately as discrete but interoperable logic devices. Depiction ofdifferent features as circuits or units is intended to highlightdifferent functional aspects and does not necessarily imply that suchcircuits or units must be realized by separate hardware or softwarecomponents. Rather, functionality associated with one or more circuitsor units may be performed by separate hardware or software components orintegrated within common or separate hardware or software components.

The techniques described in this disclosure may also be embodied orencoded in a computer-readable medium, such as a computer-readablestorage medium, containing instructions that may be described asnon-transitory media. Instructions embedded or encoded in acomputer-readable storage medium may cause a programmable processor, orother processor, to perform the method, e.g., when the instructions areexecuted. Computer readable storage media may include random accessmemory (RAM), read only memory (ROM), programmable read only memory(PROM), erasable programmable read only memory (EPROM), electronicallyerasable programmable read only memory (EEPROM), flash memory, a harddisk, a CD-ROM, a floppy disk, a cassette, magnetic media, opticalmedia, or other computer readable media.

What is claimed is:
 1. A system comprising: stimulation circuitryconfigured to generate a pacing stimulus; sensing circuitry configuredto sense an evoked response after the pacing stimulus; and processingcircuitry configured to: determine classification features from theevoked response; apply the classification features to a classificationmodel, the classification model generated by a machine learningalgorithm using one or more test sets comprising a plurality of sampleevoked responses for each of a plurality of classifications; and basedon the output of the model, classify the evoke response as one of theplurality of classifications.
 2. The system of claim 1, wherein theclassification features are a subset of possible features of the evokedresponse.
 3. The system of claim 2, wherein the classification featuresare determined by the machine learning algorithm from the possiblefeatures of the evoked response.
 4. The system of claim 1, wherein theevoked response is indicative of capture of heart muscle in response tothe pacing stimulus, and wherein the plurality of classificationsincludes selective capture, non-selective capture, right ventricularcapture, and no ventricular capture.
 5. The system of claim 1, whereinthe classification model is a decision tree model.
 6. The system ofclaim 1, wherein the processing circuitry is configured to, in responseto classifying the evoked response as one of the plurality ofclassifications, generate an alert.
 7. The system of claim 1, whereinthe processing circuitry is configured to, in response to classifyingthe evoked response as one of the plurality of classifications, change avoltage level of pacing stimulus.
 8. The system of claim 1, including animplantable medical device comprising the stimulation circuitry, thesensing circuitry, and the processing circuitry.
 9. The system of claim1, wherein the sensing circuitry is configured to sense a near fieldelectrogram (EGM) of the evoked response and a far-field EGM of theevoked response, and wherein the processing circuitry is configured todetermine a differential far field EMG.
 10. The system of claim 9,wherein the classification features comprise two or more of (a) a time(T1) between the pacing stimulus and a response of the FF potential whena negative deflection is below a predefined threshold, (b) a width (T2)of the FF potential at the negative deflection, (c) a time (T4) betweena start of the pacing stimulus to a positive peak of the DFF potential,(d) a time (T6) between the start of the pacing stimulus to a positivepeak of the NF potential, (e) a time (TMAX) between the start of thepacing stimulus to a positive peak of the FF potential, (f) a time(TMIN) between the start of ventricular pacing to a negative peak of theFF potential, (g) a negative peak amplitude (A1) of the FF potentialfrom a zero line within a predefined window, (h) an amplitude (A2) ofthe FF potential from the negative peak to a positive peak within thepredefined window 408, (i) a positive peak amplitude (A3) of the DFFpotential within the predefined window, (j) an absolute peak amplitude(AMAX) from a zero line of the NF potential, and (k) a negative slope(SP1) following a maximum positive peak of the FF potential.
 11. Amethod comprising: generating, by stimulation circuitry, a pacingstimulus; sensing, by sensing circuitry, an evoked response after thepacing stimulus; determining, by processing circuitry, classificationfeatures from the evoked response; applying, by the processingcircuitry, the classification features to a classification model, theclassification model generated by a machine learning algorithm using oneor more test sets comprising a plurality of sample evoked responses foreach of a plurality of classifications; and based on the output of themodel, classifying, by the processing circuitry, the evoke response asone of the plurality of classifications.
 12. The method of claim 11,wherein the classification features are a subset of possible features ofthe evoked response.
 13. The method of claim 12, wherein theclassification features are determined by the machine learning algorithmfrom the possible features of the evoked response.
 14. The method ofclaim 11, wherein the evoked response is indicative of capture of heartmuscle in response to the pacing stimulus, and wherein the plurality ofclassifications includes selective capture, non-selective capture, rightventricular capture, and no ventricular capture.
 15. The method of claim11, wherein the classification model is a decision tree model.
 16. Themethod of claim 11, comprising, in response to classifying the evokedresponse as one of the plurality of classifications, generating an alertor changing a voltage level of pacing stimulus.
 17. The method of claim11, wherein the stimulation circuitry, the sensing circuitry, and theprocessing circuitry are within an implantable medical device.
 18. Themethod of claim 11, wherein the evoked response includes a far field(FF) potential, a near field (NF) potential and a differential far field(DFF) potential, and wherein the classification features comprise two ormore of (a) a time (T1) between the pacing stimulus and a response ofthe FF potential when a negative deflection is below a predefinedthreshold, (b) a width (T2) of the FF potential at the negativedeflection, (c) a time (T4) between a start of the pacing stimulus to apositive peak of the DFF potential, (d) a time (T6) between the start ofthe pacing stimulus to a positive peak of the NF potential, (e) a time(TMAX) between the start of the pacing stimulus to a positive peak ofthe FF potential, (f) a time (TMIN) between the start of ventricularpacing to a negative peak of the FF potential, (g) a negative peakamplitude (A1) of the FF potential from a zero line within a predefinedwindow, (h) an amplitude (A2) of the FF potential from the negative peakto a positive peak within the predefined window 408, (i) a positive peakamplitude (A3) of the DFF potential within the predefined window, (j) anabsolute peak amplitude (AMAX) from a zero line of the NF potential, and(k) a negative slope (SP1) following a maximum positive peak of the FFpotential.
 19. The method of claim 11, wherein sensing the evokeresponse includes sensing a near field electrogram (EGM) of the evokedresponse and a far-field EGM of the evoked response, the methodcomprising determining, by the processing circuitry, a differential farfield EMG based on the far field EMG.
 20. A computer readable mediumcomprising instructions, that when executed, cause an implantablemedical device (IMD) to: generate, by stimulation circuitry of the IMD,a pacing stimulus; sense, by sensing circuitry of the IMD, an evokedresponse after the pacing stimulus; determine, by processing circuitryof the IMD, classification features from the evoked response; apply, bythe processing circuitry, the classification features to aclassification model, the classification model generated by a machinelearning algorithm using one or more test sets comprising a plurality ofsample evoked responses for each of a plurality of classifications; andbased on the output of the model, classify, by the processing circuitry,the evoke response as one of the plurality of classifications.